Multimedia Messaging Service (MMS) is a service for transporting multimedia messages between the mobile phones as well as between the mobile phone and the Internet and is commonly referred to as the MMS. The telecom operators specify a variety of multimedia messaging service centers (MMSCs) in accordance with the region to which the user belongs, and the MMSCs provide the users with the multimedia messaging service.
The service providers (SP) have the telecommunication access resources and are the direct providers of the mobile Internet application services, they are responsible for developing and providing services such as the weather MMS which can be used by the mobile phone users according to the user requirements.
The MM7 interface is the interface between the MMSC and the Multimedia Messaging Service Gateway (MMSG) and between the MMSG and the SP, the MMSG accesses the SP through the MM7 interface and completes the functions such as caching, routing and retry of the multimedia messages; the information exchange between the MMSC and the MMSG and between the MMSG and the SP is implemented through the MM7 interface.
In the prior art, the SP evenly submits a message containing the destination number to the server in the MMSG through the switch and the router. After the server receives the message and authenticates the SP successfully, it generates a message identifier MSGID1 and forwards the message to the MMSC to which the destination number belongs, after the MMSC receives the message, it generates a message identifier MSGID2, and sends a response report containing the MSGID2 to the MMSG, the MMSG generates message control information containing the MSGID1, the MSGID2, and the destination number, saves the information to the server in the MMSG, where each destination number corresponds to a piece of message control information, and determines the module number of the saved server according to the last two numbers of the destination number; after sending down the message to the mobile phone, the MMSC sends the delivery report including MSGID2, destination number and state information, determine the module number of the server according to the last two numbers of the destination number and forwards the delivery report to the right server; the server searches for the corresponding MSGID1 via the message control information stored in the server according to the MSGID2 and the destination number in the delivery report, and then generates a response report containing the MSGID1, the destination number, and the state information and sends the response report back to the SP, the SP then judges whether the final state of the message is sent successfully or not according to the MSGID1, the destination number, as well as the state information.
In the prior art, the corresponding relationship between the destination number and the server module number is preconfigured by the system, for example: 00-49: 180, 50-99: 181 indicates that: when the last two numbers of the phone number are in the range of 00-49, it corresponds to the service 180, and when the last two numbers of the phone number are in the range of 50-99, it corresponds to the service 181. If a server 182 is added in the MMSG, in order to achieve the even allocation of the load, the server allocation rule needs to be re-specified, and the existing destination number is reconfigured, such as: 00-33: 180, 34-66: 181, and 67-99: 182. In the case that the current network traffic is increasing tremendously, there are thousands of destination numbers stored in the server, making the re-configuration of the destination numbers more and more difficult to implement.
In addition, since the MSGID2 is generated by the MMSG, the generated rules cannot be determined by the MMSG, when the MMSC returns the delivery reports back to the servers in the MMSC, the only way is according to the aforementioned server allocation rules, the module number of the server to which the messages are delivered is determined according to the last two numbers of the destination number, and in the group message, if the destination number of the message is exactly between 00-33, all the delivery reports will be totally allocated to the server 180 for processing, while the other two servers 181 and 182 are in idle state, thus the load balancing of the servers cannot be realized.
Content of the Invention
For this reason, the main purpose of the present invention is to provide a method and system for allocating delivery reports to evenly allocate delivery reports of a MMSC to each server in the MMSG, thus to achieve the load balancing of the servers and improve system scalability.
To achieve the aforementioned purpose, the technical scheme of the present invention is accomplished as:
the present invention provides a method for allocating delivery reports, comprising:
a service provider (SP) setting a message identifier MSGID1 in a multimedia message, and submitting the multimedia message containing the MSGID1 and a destination number to a server in a multimedia messaging service gateway (MMSG), and the server setting a message identifier MSGID2 in the multimedia message, and forwarding the multimedia message containing the MSGID2 and the destination number to a multimedia messaging service center (MMSC);
the MMSG parsing the corresponding server generating the MSGID2 according to the MSGID2 in the delivery report returned by the MMSC, and forwarding the delivery report to the server generating the MSGID2.
In the above solution, the method further comprises: said MSGID2 comprising a module number of the server setting the MSGID2.
In the above solution, the method further comprises: after forwarding the multimedia message to the MMSC, the server generating message control information and saving the message control information in the server, the MMSC sending the received multimedia message to a mobile phone, and returning the delivery report back to the MMSG.
In the above solution, the method further comprises: the message submitted to the server in the MMSG comprising the MSGID1, message subject, message content, the destination number and message priority;
the message forwarded by the server to the MMSC comprises: the MSGID2 and the destination number.
In the above solution, the message control information comprises: corresponding relationship among the MSGID1, the MSGID2, the destination number and SP address;
the delivery report returned by the MMSC to the MMSG comprises: the MSGID2 and the destination number.
In the above solution, the method further comprises: after said delivery report is forwarded to the corresponding server generating the MSGID2, the server receiving the delivery report searching out the corresponding MSGID1 according to the message control information saved in the server, generating a delivery report containing the MSGID1 and state information and returning the delivery report back to the SP.
The present invention also provides a system for allocating delivery reports, comprising a SP, a server in a MMSG, and a MMSC, and the system further comprises: a message generating and submitting module contained in the SP, a message generating and forwarding module, a control information storing module and a delivery report transceiving and parsing module contained in the server; wherein,
the message generating and submitting module is configured to set a message identifier MSGID1 in a multimedia message, and submit the multimedia message containing the MSGID1 to the server;
the message generating and forwarding module is configured to set a message identifier MSGID2 in the multimedia message, and forward the multimedia message containing the MSGID2 to the MMSC;
the control information storing module is configured to store message control information;
the delivery report transceiving and parsing module is configured to receive the delivery report returned by the MMSC, and in accordance with the MSGID2 in the delivery report, parse a module number of the server generating the MSGID2, and forward the delivery report to the server generating the MSGID2.
In the above solution, the MSGID2 set by the message generating and forwarding module contains the module number of the server generating the MSGID2.
In the above solution, the multimedia message submitted to the server comprises: the MSGID1, a message subject, message content, a destination number, and message priority;
the multimedia message forwarded to the MMSC comprises: the MSGID2 and the destination number;
the message control information comprises corresponding relationship among the MSGID1, the MSGID2, the destination number, and SP address;
the delivery report comprises: the MSGID2, the destination number, and state information.
In the above solution, the delivery report transceiving and parsing module is further configured to receive delivery reports forwarded from other servers.
In the above solution, the system further comprises: a response report generating module and a final state determining module; wherein,
the response report generating module is configured to search out the corresponding MSGID1 in the control information storing module according to the MSGID2 and the destination number in the delivery report, generate a response report containing the MSGID1 and the state information and return the response report back to the SP;
the final state determining module is configured to determine a final state of the message according to the MSGID1 and the state information in the response report.